package com.tzl.design_pattern.observer_pattern;

/**
 * 观察者模式:<br>
 *
 * @author Zhilei Tang
 * @date Created in 2020/11/14 21:43
 */
public class ObserverTest {
  public static void main(String[] args) {
    // 被观察者
    WeatherData weatherData = new WeatherData();
    WeatherDisplay weatherDisplay = new WeatherDisplay(weatherData);
    weatherData.setMeasurements(37.43F, 432.43F, 432.65F);
    weatherDisplay.display();
  }
}
